<template>
  <div>
    <t-button @click="textMessage">打开消息提示</t-button>
    <t-button @click="showVNodeMessage">VNode</t-button>
  </div>
</template>

<script>
import { h } from 'vue'

export default {
  methods: {
    textMessage() {
      this.$message.info('这是一个消息提示')
    },
    showVNodeMessage() {
      this.$message({
        content: h('p', null, [
          h('span', null, '内容可以是 '),
          h('i', {style: 'color: teal'}, 'VNode')
        ])
      })
    }
  }
}
</script>

<style scoped>

</style>